package com.kly.enums;

/**
 * google pay 订阅确认状态
 * ACKNOWLEDGEMENT_STATE_UNSPECIFIED	未指定的确认状态。
 * ACKNOWLEDGEMENT_STATE_PENDING	订阅尚未确认。
 * ACKNOWLEDGEMENT_STATE_ACKNOWLEDGED	已确认订阅。
 * @author linqu
 */
public enum AcknowledgementState {
    ACKNOWLEDGEMENT_STATE_UNSPECIFIED,
    ACKNOWLEDGEMENT_STATE_PENDING,
    ACKNOWLEDGEMENT_STATE_ACKNOWLEDGED;

    public static AcknowledgementState transformByName(String name) {
        for (AcknowledgementState googlePaySubscriptionsStatus : AcknowledgementState.values()) {
            if (googlePaySubscriptionsStatus.name().equalsIgnoreCase(name)) {
                return googlePaySubscriptionsStatus;
            }
        }
        return null;
    }
}
